﻿using UnityEngine;
using System.Collections;

public class LightController : MonoBehaviour {

    public GameObject mapController;

    public GameObject cameraController;

    public bool isLightLoadFinish = false;

	// Use this for initialization
	void Start () {
	    
	}
	
	// Update is called once per frame
	void Update () {
	
	}
    public void LightInit()
    {
        if (MapController.mapConfigure != null && mapController != null)
        {
            Mesh mesh = mapController.GetComponent<MapController>().backGroundMesh;

            transform.position = mesh.bounds.center;

            transform.Rotate(new Vector3(180,0,0));
        }

        isLightLoadFinish = true;

        cameraController.SendMessage("initCamera");
    }
}
